package com.zero.ava.kernel.schedule;



import java.util.Collection;

import com.zero.ava.kernel.RecurringTaskHandle;
import com.zero.ava.kernel.TaskReservation;

public interface SchedulerQueue {

	int getReadyCount();

	ScheduledTask getNextTask(boolean wait) throws InterruptedException;

	int getNextTasks(Collection<? super ScheduledTask> tasks, int max);

	TaskReservation reserveTask(ScheduledTask task);

	void addTask(ScheduledTask task);

	RecurringTaskHandle createRecurringTaskHandle(ScheduledTask task);

	void notifyCancelled(ScheduledTask task);
	
	void shutdown();

}
